package com.achievo.know.application;

import java.util.List;

import com.achievo.know.domain.Function;
import com.achievo.know.domain.Function.Status;

/**
 * 功能实体应用层接口
 *<br />
 * @author vakin.Jiang
 *2010-4-19
 */
public interface FunctionApplication{
	
	/**
	 * 查询某节点全部子节点
	 * @param parentId
	 * @return
	 */
	public List<Function> queryChildNode(Long parentId,int currentPage, int pageSize);
	
	public Function getFunctionById(Long id);
	
	public Function createFunction(Function entity);
	
	public Function updateFunction(Function entity);
	
	public void deleteFunctionById(Long id);
	
	public Long getCount(Function search);
	
	public List<Function> queryAllByPage(Function search,int currentPage, int pageSize);
	
	/**
	 * 增加/解除功能实体关联关系
	 * @param id
	 * @param ids
	 */
	public void setRelevance(long rscId, long destId);
	
	
	
	/**
	 * 更新功能实体状态
	 * @param Function
	 * @param status
	 */
	public void changStatus(Long id , Status status);
	
	/**
	 * 获取默认父实体,不存在则创建
	 * @return
	 */
	public Function getDefaultRootFunction();
}
